//配置路由的地方
import Vue from 'vue'
import VueRouter from 'vue-router'
//使用插件
Vue.use(VueRouter)
//引入路由组建
// import Home from '@/pages/Home'
// import Login from '@/pages/Login'
// import Register from '@/pages/Register'
// import Search from '@/pages/Search'
//配置路由
export default new VueRouter({
    //配置路由
    routes:[
        {path:'/home',
        component:()=>import('@/pages/Home'),
        //路由源信息
         meta:{show:true} },
        {path:'/login',
        component: ()=>import('@/pages/Login')},
        {path:'/register',
        component: ()=>import('@/pages/Register')},
        {path:'/search',
        component: ()=>import('@/pages/Search')},
        {path:'/',
        redirect: '/home',
        component: () => import('@/pages/Home'),}
    ]
})